Camera pose estimation device and control method

ABSTRACT

A method includes determining movement of a camera from a first time point when a first image has been captured to a second time point when a second image has been captured, performing first estimation processing for estimating a position and pose of the camera in the second time point based on image data at the time of capturing, a past image captured in the past, and a past position and pose of the camera at a time point when the past image has been captured, when the movement is not a translational movement and a rotation movement around an optical direction, and performing a second estimation processing for estimating the position and pose based on a feature descriptor of a feature point extracted from the second image and a feature descriptor of a map point accumulated when the movement is the translational movement or the rotational movement.

CROSS-REFERENCE TO RELATED APPLICATION

This application is based upon and claims the benefit of priority of theprior Japanese Patent Application No. 2015-118360, filed on Jun. 11,2015, the entire contents of which are incorporated herein by reference.

FIELD

The embodiments discussed herein are related to a camera pose estimationdevice and others.

BACKGROUND

There are methods of obtaining a position and pose of a camera mountedon a personal computer (PC), a mobile terminal, and other devices.Furthermore, techniques are known that use the obtained position andpose of the camera to cause additional information to be superimposed ona captured image displayed on a screen of the PC or the mobile terminalin order to realize user work support.

As a conventional technique of estimating a position and pose of acamera from a screen from moment to moment, a method that uses a featurepoint included in an image is available, for example. With theconventional technique using a feature point, a three-dimensionalcoordinate map with respect to an object is created in advance, and afeature point present in the current image is associated with a group ofpoints in the map every frame, whereby the position and pose of thecamera is estimated.

FIG. 13 is a diagram explaining a conventional technique for obtaining aposition and pose of a camera. In the example illustrated in FIG. 13,map points S₁ to S₆ are present. A map point S_(i) is presented byexpression (1). On an image 20, feature points x₁ to x₆ are present. Afeature point x_(i) is presented by expression (2) in a cameracoordinate system. Map points projected on the captured image 20 areprojected points x₁′ to x₆′. A projected point x_(i)′ is presented byexpression (3) in a camera coordinate system.S _(i)=(x,y,z)  (1)x _(i)=(u,v)  (2)x _(i)′=(u′,v′)  (3)

For example, with a conventional technique, a camera position and posematrix M is calculated such that a sum of squares E calculated byexpression (4) is the smallest, whereby a position and pose of a camerais obtained.

$\begin{matrix}{E = {\sum\limits_{p}\;{{x_{p}^{\prime} - x_{p}}}^{2}}} & (4)\end{matrix}$

At this time, when the user is performing an operation, the position andpose of the camera are frequently changed, and estimation of theposition and pose of the camera is temporarily lost in some cases. Forexample, when the user turns the mobile terminal downward, the cameramounted on the mobile terminal also faces down. With this, featurepoints included in the object are not detected in the captured image ofthe camera, whereby detection of the position and pose of the camera istemporarily disabled.

When the camera is directed to the object again from the state in whichthe position and pose of the camera is not detected, processing forrestarting the camera position and pose estimation processing isperformed. This processing is referred to as relocalization processing.For the relocalization processing, a plurality of techniques areavailable. For example, the relocalization processing includes atechnique using an image-to-image method and a technique using animage-to-map method. Furthermore, a technique that determines an posechange of an imaging device is also available (see Japanese Laid-openPatent Publication No. 2011-130180).

The image-to-image method will be described. The image-to-image methoduses a keyframe in the relocalization processing. A keyframe is a pieceof information in which a camera position and pose value is associatedwith a captured image of the camera at that time. By using athree-dimensional map acquired in advance, the user accumulateskeyframes during the camera position and pose estimation. When theposition and pose of the camera is lost, the image-to-image methodsearches for keyframes being the most similar to the current capturedimage of the camera, estimates a relative position and pose between thesearched keyframes and the current camera, and thereby obtains thecurrent position and pose of the camera. With the image-to-image method,the relocalization processing is performed using two images, asdescribed above.

An advantage of the image-to-image method will be described. Theimage-to-image method enables high-speed relocalization processing.

The image-to-map method will be described. With the image-to-map method,a local feature descriptor for each feature point is used forrelocalization processing. With the image-to-map method, feature pointswithin the current captured image of the camera are associated with mappoints through matching of the local feature descriptors. With theimage-to-map method, if a corresponding pair of three or more featurepoints and map points is able to be found, the current position and poseof the camera may be estimated by a perspective N-point (PnP) algorithm.The image-to-map method performs the relocalization processing byassociating feature points within the captured image with map points asdescribed above.

An advantage of the image-to-map method will be described. Theimage-to-map method enables estimation of the position and pose withless keyframes compared with the image-to-image method.

SUMMARY

According to an aspect of the invention, a method includes determiningmovement of a camera from a first time point when a first image has beencaptured to a second time point when a second image has been capturedbased on the first image and the second image captured by the camera,performing first estimation processing for estimating a position andpose of the camera in the second time point based on image data at thetime of capturing, a past image captured in the past, and a pastposition and pose of the camera at a time point when the past image hasbeen captured, when the movement is not a translational movement and arotation movement around an optical direction, and performing a secondestimation processing for estimating the position and pose of the cameraat the second time point based on a feature descriptor of a featurepoint extracted from the second image and a feature descriptor of a mappoint accumulated in the past, when the movement is the translationalmovement or the rotational movement.

The object and advantages of the invention will be realized and attainedby means of the elements and combinations particularly pointed out inthe claims.

It is to be understood that both the foregoing general description andthe following detailed description are exemplary and explanatory and arenot restrictive of the invention, as claimed.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a diagram explaining an idea with respect to switching betweenan image-to-image method and an image-to-map method which has beendesigned by the inventor;

FIG. 2 is a diagram illustrating an example of a data structure of athree-dimensional map;

FIG. 3 is a diagram illustrating an example of a data structure of akeyframe table;

FIG. 4 is a functional block diagram illustrating a configuration of acamera pose estimation device according to an embodiment;

FIG. 5 is a diagram illustrating an example of a matching result;

FIG. 6 is a flow chart illustrating a procedure of processing performedby a camera pose estimation device according to a first embodiment;

FIG. 7 is a diagram illustrating a configuration of a camera poseestimation device according to a second embodiment;

FIG. 8 is a diagram illustrating an example of a target marker in thesecond embodiment;

FIG. 9 is a flow chart illustrating a procedure of processing performedby a camera pose estimation device according to the second embodiment;

FIG. 10 is a flow chart illustrating a procedure of processing performedby a camera pose estimation device according to other embodiment;

FIG. 11 is a diagram illustrating a problem in initial positionestimation based on a DLT method;

FIG. 12 is a diagram illustrating an example of a computer executing acamera pose estimation program; and

FIG. 13 is a diagram explaining a conventional technique for obtaining aposition and pose of a camera.

DESCRIPTION OF EMBODIMENTS

The conventional technique described above has a problem that theconventional technique is not able to accurately estimate a position andpose of a camera.

Firstly, a disadvantage of an image-to-image method will be described.With the image-to-image method, in order to improve accuracy ofrelocalization processing, the number of keyframes to be distributed hasto be increased in advance so that uneven distribution thereof isreduced. When the user work support is assumed, a user who is notfamiliar with the image-to-image method performs high-level accumulationof keyframes. This is not very efficient.

Furthermore, the image-to-image method is not able to performrelocalization depending on the positional relation between the mostsimilar keyframes and the current camera. The image-to-image method withwhich a relative pose is obtained from two images is only able toestimate a relative rotation motion of the camera and is not able toestimate a translational motion.

Next, a disadvantage of an image-to-map method will be described. Withthe image-to-map method, a higher processing cost is caused by therelocalization processing, compared with the case of the image-to-imagemethod. For example, with the image-to-map method, extraction andmatching of local feature descriptors are performed with respect to allkeyframes, whereby the processing cost is increased.

Furthermore, the image-to-map method is not able to performrelocalization depending on the current positional relation of thecamera. For example, with respect to non-affine invariant featuredescriptors, matching of the feature descriptors fails unless the camerais in an oblique direction against the object.

As described above, each of the image-to-image method and theimage-to-map method has its merits and demerits. Depending on theposition and pose of the camera, it is hard to estimate the position andpose of the camera. For this reason, it is desired to estimate theposition and pose of the camera in a manner corresponding to variouspositions and poses of the camera.

According to one aspect, a technique disclosed in an embodiment is forestimating a position and pose of a camera.

Embodiments of a camera pose estimation device, a camera pose estimationmethod, and a camera pose estimation program will be described below indetails with reference to the drawings. It is noted that the presentdisclosure is not limited by these embodiments.

First Embodiment

FIG. 1 is a diagram explaining an idea with respect to switching betweenan image-to-image method and an image-to-map method which has beendesigned by the inventor. In FIG. 1, “circle” indicates that thecorresponding method is able to estimate the position and pose of thecamera, and “cross mark” indicates that the corresponding method is notable to estimate the position and pose of the camera. “Triangle”indicates that the corresponding method is able to estimate the positionand pose of the camera with conditions.

For example, the image-to-image method does not correspond to atranslational motion because only a relative rotation motion betweenpast keyframes and the current camera position is estimated.

On the other hand, when only an on-the-spot rotation is included, thecorrespondence relation varies depending on whether the rotation isaround the optical axis of the camera or around the axis perpendicularto the optical axis. Although rotation around the optical axis may becorresponded by the image-to-image method even in the case of a smallamount of rotation, the image-to-map method is more suitable than theimage-to-image method.

The image-to-image method is able to correspond to rotation around theaxis perpendicular to the optical axis. However, with respect to therotation around the axis perpendicular to the optical axis, theimage-to-image method only corresponds to a very small descriptor ofrotation unless the feature descriptor is affine invariant.

The image-to-image method does not correspond to a motion in which atranslational movement and a rotation are integrated because the motionincludes a translational movement. The image-to-map method is only ableto correspond to a very small amount of rotation unless the featuredescriptor is affine invariant.

In view of the matters described with reference to FIG. 1, a camera poseestimation device according to a first embodiment determines whether ornot the camera motion includes a translational movement, and if thecamera motion includes a translational movement, selects theimage-to-map method to perform relocalization processing. The camerapose estimation device, if the camera motion does not include atranslational movement, determines around what direction the on-the-spotrotation is mainly performed, and if the on-the-spot rotation isperformed around the optical axis, uses the image-to-map method toperform relocalization processing. In other cases, the camera poseestimation device uses the image-to-image method to performrelocalization processing. With this, regardless of the positionalrelation between the position of the camera before the movement and thatafter the movement, the camera pose estimation device is able toestimate the position and pose of the camera and perform appropriaterelocalization processing.

At this point, the camera pose estimation device according to the firstembodiment creates in advance a three-dimensional map and a keyframetable for use in estimation of the position and pose of the camera. Amethod for creating a three-dimensional map and a method for creating akeyframe table will be described below in this order.

Processing for creating a three-dimensional map will be described.Before the estimation of the position and pose of the camera, the camerapose estimation device measures three-dimensional coordinates of naturalfeature points around the target device that uses an augmented reality(AR) function. The creation method will be described below. In thedescription below, the natural feature points in a three-dimensionalspace are denoted as map points as appropriate. Furthermore, map pointson an image are denoted as feature points.

The camera pose estimation device captures two images from differentviewpoints by using the camera. The camera pose estimation deviceextracts feature points corresponding to the map points from the twoimages, and performs matching of the feature points common in the twoimages. For example, the feature points are detected based on the factthat gradation variation is great in the vicinity of a noted point andthe position of the noted point on the image is uniquely defined inaccordance with the gradation variation.

For the extraction and matching of the feature points, processing suchas SIFT, SURF, and ORB is used. For example, for the processing of SIFT,the processing described in D. G. Lowe, “Distinctive Image Features fromScale-Invariant Keypoints”, International Journal of Computer Vision,Vol. 60, No. 2, pp. 91-110, 2004 may be performed.

The camera pose estimation device uses a matched pair of feature pointsto calculate a basic matrix based on an 8-point algorithm between thetwo images. The camera pose estimation device uses triangulation of thebasic matrix and the feature points to acquire three-dimensionalcoordinates of the map points and thereby creates a three-dimensionalmap.

For example, the camera pose estimation device may use the processingdescribed in R. I. Hartley, “In Defense of the Eight-point Algorithm”,IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 19,No. 6, pp. 580-593, 1997 as processing for the 8-point algorithm. Thecamera pose estimation device may use the processing described in R. I.Hartley et al., “Triangulation”, Computer Vision and ImageUnderstanding, Vol. 68, No. 2, pp. 146-157, 1997 as processing fortriangulation.

FIG. 2 is a diagram illustrating an example of a data structure of athree-dimensional map. As illustrated in FIG. 2, the three-dimensionalmap associates a number, X, Y, Z, and a feature descriptor with oneanother. In FIG. 2, the number is a number for uniquely identifying amap point. As in the example illustrated in FIG. 2, 68 pieces of mappoints are included in the three-dimensional map. X, Y, Z indicatethree-dimensional coordinates of the map points. The feature descriptorsare feature descriptors of the feature points on the image thatcorrespond to the map points. For example, the feature descriptors maybe the values of pixels around the feature points. When the processingmethod described above is used, the first camera viewpoint becomes theorigin of world coordinates as is.

Next, processing for creating a keyframe table will be described. Inaddition to the three-dimensional map, the camera pose estimation devicealso uses a three-dimensional map acquired in advance and calculates theposition and pose of the camera with the method described below. Thecamera pose estimation device stores information that associates acaptured image having been captured by the camera while the camera poseestimation is stable with the position and pose of the camera at thetime point of capturing the captured image in the keyframe table as akeyframe. The camera pose estimation device adds a keyframe whenconditions 1 to 3 described below are all satisfied.

A predetermined period of time has elapsed after the last time akeyframe is added . . . . (Condition 1)

The estimated value of the position and pose of the camera is highquality . . . . (Condition 2)

The Euclidean distance between the nearest keyframes is equal to orhigher than a threshold . . . . (Condition 3)

The predetermined period of time in condition 1 is 660 ms, for example.The processing for determining whether or not the estimated value ishigh quality in condition 2 will be described later. The threshold incondition 3 is the same value as the value of the distance between twocameras in the three-dimensional map created in advance, for example.

FIG. 3 is a diagram illustrating an example of a data structure of akeyframe table. As illustrated in FIG. 3, this keyframe table associatesa number, a position and pose, and a captured image with one another. InFIG. 3, the number is a number for uniquely identifying the keyframe.The position and pose indicates the position and the pose of the camera.The captured image is an image data captured by the camera. In theexample illustrated in FIG. 3, 25 pieces of keyframes are included inthe keyframe table.

For example, the position and pose of the camera is six-dimensionallyrepresented (r1, r2, r3, t1, t2, t3). Out of these, (r1, r2, r3)represent the pose of the camera in the world coordinates. (t1, t2, t3)represent the position of the camera in the world coordinates.

Next, a configuration of the camera pose estimation device according tothe first embodiment will be described. FIG. 4 is a functional blockdiagram illustrating a configuration of a camera pose estimation deviceaccording to the present embodiment. As illustrated in FIG. 4, a camerapose estimation device 100 is connected to a camera 50. The camera poseestimation device 100 includes an image acquisition unit 110, a featurepoint extraction unit 120, a camera pose estimation unit 130, and aquality determination unit 140. The camera pose estimation device 100further includes a preprocessing unit 150, a determination unit 160, afirst relocalization processing unit 170, and a second relocalizationprocessing unit 180.

The camera 50 is a monocular red-green-blue (RGB) camera mounted on a PCor a mobile terminal. The camera 50 captures an image from an optionalviewpoint and outputs the captured image to the image acquisition unit110.

The image acquisition unit 110 is a processing unit that is connected tothe camera 50 and acquires the captured image from the camera 50. Theimage acquisition unit 110 outputs the captured image to the featurepoint extraction unit 120.

The feature point extraction unit 120 is a processing unit that extractsa feature point from the captured image. For example, the feature pointextraction unit 120 performs processing such as SIFT, SURF, and ORB andthereby extracts the feature points. The feature point extraction unit120 outputs information of the feature points to the camera poseestimation unit 130. The information of the feature points includestwo-dimensional coordinates and the feature descriptor of each featurepoint extracted from the captured image, for example.

The camera pose estimation unit 130 is a processing unit that performsmatching between a feature point and a map point based on theinformation of the feature points acquired from the feature pointextraction unit 120 and the three-dimensional map illustrated in FIG. 2and estimates the position and pose of the camera 50 based on the resultof the matching.

An example of processing for matching a map point and a feature pointthat is performed by the camera pose estimation unit 130 will bedescribed. The camera pose estimation unit 130 uses the position andpose of the camera 50 that has been estimated last time to determine themap point in the three-dimensional map that the feature pointcorresponds to. The camera pose estimation unit 130 obtains coordinateswith which the map points are projected on the captured image at theprevious time by using expression (5). In the description below, the mappoints projected on the captured image are denoted as projection pointsas appropriate.

$\begin{matrix}{\begin{pmatrix}u \\v \\1\end{pmatrix} = {{A\left( R \middle| t \right)}\begin{pmatrix}X \\Y \\Z \\1\end{pmatrix}}} & (5)\end{matrix}$

In expression (5), A is a matrix of 3 rows×3 columns and corresponds toan internal parameter of the camera 50. The user is to performcalibration of the camera 50 in advance based on Z. Zhang, “A FlexibleNew Technique for Camera Calibration”, IEEE Transactions on PatternAnalysis and Machine Intelligence, Vol. 22, No. 11, pp. 1330-1334, 2000.

In expression (5), (R|t) is a matrix of 3 rows×4 columns integratingvalues obtained by converting the position and pose of the camera 50that has been estimated last time into a rotation matrix R of 3 rows×3columns and a translational vector t using Rodrigues' conversion formulapresented in expression (6). (u, v) are two-dimensional coordinates of aprojection point in a case where a map point is projected on thecaptured image. (X, Y, Z) are three-dimensional coordinates of each mappoint.

$\begin{matrix}{R = {{\cos\;\theta*I} + {\left( {1 - {\cos\;\theta}} \right)*{rr}^{T}} + {\sin\;\theta*\begin{bmatrix}0 & {- r_{3}} & r_{2} \\r_{3} & 0 & {- r_{1}} \\{- r_{2}} & r_{1} & 0\end{bmatrix}^{t}}}} & (6)\end{matrix}$

In expression (6), I represents a unit matrix. θ is defined byexpression (7). r is defined by expression (8).

$\begin{matrix}{\theta = \sqrt{r_{1}^{2} + r_{2}^{2} + r_{3}^{2}}} & (7) \\{r = \begin{pmatrix}\begin{matrix}r_{1} \\r_{2}\end{matrix} \\r_{3}\end{pmatrix}} & (8)\end{matrix}$

The camera pose estimation unit 130 calculates, with respect to each ofthe projection points, the distance thereof from the feature points onthe captured image at the current time, which are present within a rangeof a certain threshold. The camera pose estimation unit 130 identifiesthe projection point and the feature point between which the distance isthe smallest and defines the map point corresponding to the identifiedprojection point and the feature point to be a pair. The camera poseestimation unit 130 repeatedly performs the above-described processingwith respect to all the projection points and performs matching of themap points corresponding to the projection points and the feature pointson the captured image at the current time. The threshold is set to 20pixels, for example.

After the matching, the camera pose estimation unit 130 performs theprocessing for estimating the position and pose of the camera 50. Whenthree or more pairs of the feature points and the map points arepresent, the camera pose estimation unit 130 uses a PnP algorithm toestimate the position and pose of the camera. For example, the camerapose estimation unit 130 may estimate the position and pose of thecamera by using the PnP algorithm described in V. Lepetit et al., “EPnP:An Accurate O(n) Solution to the PnP Problem”, International Journal ofComputer Vision, Vol. 81, Issue 2, pp. 155-166, 2008.

Furthermore, the camera pose estimation unit 130 may estimate theposition and pose of the camera 50 by using expression (4). The camerapose estimation unit 130 calculates a camera position and pose matrix Msuch that the sum of squares E presented in expression (4) is thesmallest, and thereby obtains the position and pose of a camera. Thecamera pose estimation unit 130 outputs information of the position andpose of the camera 50 and information of the number of matched pairs tothe quality determination unit 140.

The quality determination unit 140 is a processing unit that determinesquality of the position and pose of the camera 50 that has beenestimated by the camera pose estimation unit 130. For example, thequality determination unit 140 calculates the ratio of the number ofmatched pairs to the total number of map points included in thethree-dimensional map. When the calculated ratio is equal to or higherthan a predetermined ratio, the quality determination unit 140determines that the estimated value of the position and pose of thecamera 50 is high quality. By contrast, when the calculated ratio islower than the predetermined ratio, the quality determination unit 140determines that the estimated value of the position and pose of thecamera 50 is low quality. For example, the predetermined ratio is 30%,for example.

When the quality determination unit 140 has determined that theestimated value of the position and pose of the camera 50 is highquality, the quality determination unit 140 determines that the positionand pose of the camera 50 at the current time is the position and poseestimated by the camera pose estimation unit 130 and stores the positionand pose thus determined in a predetermined storing unit.

When the quality determination unit 140 has determined that theestimated value of the position and pose of the camera 50 is lowquality, the quality determination unit 140 outputs a relocalizationprocessing request to the preprocessing unit 150.

The preprocessing unit 150 is a processing unit that, upon acquiring therelocalization processing request from the quality determination unit140, compares the captured image at the current time and the keyframetable illustrated in FIG. 3 and searches for a reference keyframe. Thepreprocessing unit 150 outputs information of the reference keyframe tothe determination unit 160.

The preprocessing unit 150 compares the captured image at the currenttime and the keyframe table and identifies a keyframe including acaptured image the most similar to the captured image at the currenttime as the reference keyframe. The preprocessing unit 150 outputsinformation of the reference keyframe to the first relocalizationprocessing unit 170 and the determination unit 160.

At this point, an example of the processing performed by thepreprocessing unit 150 to search for the keyframe including a capturedimage the most similar to the captured image at the current time will bedescribed. The preprocessing unit 150 reduces the current captured imageand the captured image of each keyframe to a predetermined size, andwith each of these images blurred by a Gaussian filter, calculates a sumof squared distance (SSD) for each pixel, and identifies a keyframe theSSD value of which is the smallest as the reference keyframe.

The determination unit 160 is a processing unit that determines which ofthe image-to-image method or the image-to-map method is to be used forperforming relocalization processing. When the determination unit 160has determined that the image-to-image method is used to performrelocalization processing, the determination unit 160 makes arelocalization processing request to the first relocalization processingunit 170. When the determination unit 160 has determined that theimage-to-map method is used to perform relocalization processing, thedetermination unit 160 makes a relocalization processing request to thesecond relocalization processing unit 180. In the description below,processing performed by the determination unit 160 will be specificallydescribed.

The determination unit 160 first determines whether or not atranslational component is included in the positional relation betweenthe position of the camera 50 of the reference keyframe and the currentposition of the camera 50. When a translational component is included inthe positional relation, the determination unit 160 determines thatrelocalization processing is to be performed by the image-to-map method.

When no translational component is included in the positional relation,the determination unit 160 determines whether or not a rotation aroundthe optical axis of the camera 50 is included. When a rotation aroundthe optical axis is included, the determination unit 160 determines thatrelocalization processing is to be performed by the image-to-map method.When no translational component is included and no rotation around theoptical axis is included in the positional relation, the determinationunit 160 determines that relocalization processing is to be performed bythe image-to-image method.

At this point, an example of the processing for determining whether ornot a translational component is included in the positional relationwill be described. The determination unit 160 uses an index referred toas geometric robust information criteria (GRIC) to determine whether ornot a translational component is included in the positional relation.Processing related to the GRIC is described in P. H. S. Torr et al.,“The Problem of Degeneracy in Structure and Motion Recovery fromUncalibrated Image Sequences”, International Journal of Computer Vision,Vol. 32, No. 1, pp. 27-44, 1999.

The GRIC is a type of information criterion and an index for evaluatingthe conformity of a geometric model. A specific calculation expressionfor calculating the GRIC is presented by expression (9). In expression(9), I represents the number of corresponding points. e_(i) representsan error between a corresponding point i and ideal coordinatescalculated based on an obtained model. σ represents a standard deviationof an error. ρ(e² _(i)) is presented by expression (10). λ₁ and λ₂presented by expression (9) and λ₃ presented by expression (10) arepresented by expression (11). In represents a natural logarithm.

$\begin{matrix}{{GRIC} = {{\sum\limits_{i = 1}^{1}\;{\rho\left( e_{i}^{2} \right)}} = {{\lambda_{1}{mI}} + {\lambda_{2}k}}}} & (9) \\{{\rho\left( e_{i}^{2} \right)} = {\min\left( {\frac{e^{2}}{\sigma^{2}},{\lambda_{3}\left( {r - m} \right)}} \right)}} & (10) \\{{\lambda_{1} = {\ln\; 4}},{\lambda_{2} = {\ln\; 4I}},{\lambda_{3} = 2}} & (11)\end{matrix}$

At this point, the relation between the two images of the captured imageof the reference keyframe and the current captured image may beexplained by a fundamental matrix F and a homography matrix H because ofthe positional relation of the camera. For example, when only anon-the-spot rotation is included in the motion, the homography matrix His used. When a translational movement is included in the motion, thefundamental matrix F is used.

In a model of the fundamental matrix F, the values of m, k, and r inexpressions (9) and (10) are to be those presented in expression (12).In a model of the homography matrix H, the values of m, k, and r are tobe those presented in expression (13).(m,k,r)=(3,7,4)  (12)(m,k,r)=(2,8,4)  (13)

The determination unit 160 compares GRIC scores based on the homographymatrix and GRIC scores based on the fundamental matrix between thecurrent captured image and the captured image of the reference keyframe,and thereby determines whether or not a translational component isincluded. The GRIC score based on the homography matrix is denoted asGRIC_H as appropriate. The GRIC score based on the fundamental matrix isdenoted as GRIC_F as appropriate. Specific determination processingperformed by the determination unit 160 will be described below.

The determination unit 160 calculates the feature points and the featuredescriptors in the current captured image and the captured image of thereference keyframe and calculates the corresponding points. Theprocessing performed by the determination unit 160 to extract thefeature points from the current captured image and the captured image ofthe reference keyframe is the same as the processing performed by thefeature point extraction unit 120 to extract the feature points.

For the processing performed by the determination unit 160 to match thefeature points of the current captured image and the feature points ofthe captured image of the reference keyframe to calculate thecorresponding points, the processing corresponding to the camera poseestimation unit 130 is performed. For example, the determination unit160 calculates the inter-vector distance with respect to each of a firstfeature point of the current captured image and a second feature pointof the captured image of the reference keyframe and identifies a pair ofthe first feature point and the second feature point with which theinter-vector distance is the smallest as the corresponding point.

After calculating the corresponding point, the determination unit 160calculates the fundamental matrix F and the homography matrix H by usingthe calculated corresponding point. For example, the determination unit160 calculates the fundamental matrix F based on the above-described8-point algorithm. The determination unit 160 calculates the homographymatrix H by using methods such as a DLT method and a RANSAC method. Forthe RANSAC method, the technique described in R. Hartley et al.,Multiple View Geometry in Computer Vision, Cambridge University Press,Cambridge, U. K., 2000 may be used, for example.

The determination unit 160 projects the first feature point on thecaptured image of the reference keyframe by using the fundamental matrixF and identifies the error between the projected point and the secondfeature point as the value of e in the case of obtaining the GRIC_F. Thedetermination unit 160 calculates the value of e for each of thecorresponding points. The determination unit 160 calculates the value ofthe GRIC_F based on each of the obtained values of e and expressions (9)to (11) and (12).

The determination unit 160 projects the first feature point on thecaptured image of the reference keyframe by using the homography matrixH and identifies the error between the projected point and the secondfeature point as the value of e in the case of obtaining the GRIC_H. Thedetermination unit 160 calculates the value of e for each of thecorresponding points. The determination unit 160 calculates the value ofthe GRIC_H based on each of the obtained values of e and expressions (9)to (11) and (13).

The determination unit 160 compares the value of GRIC_F and the value ofthe GRIC_H. When the value of GRIC_H is larger than the value of theGRIC_F, the determination unit 160 determines that a translationalcomponent is included. If a translational component is included, it isindicated that the current camera 50 has performed translationalmovement with respect to the previous position of the camera 50. Whenthe value of GRIC_H is not larger than the value of the GRIC_F, thedetermination unit 160 determines that no translation component isincluded.

Next, it is determined whether or not a rotation around the optical axisof the camera 50 is included. For example, the determination unit 160obtains a rotation angle with respect to each axis from a rotationmatrix and, when the rotation angles around two axes perpendicular tothe optical axis do not exceed a prescribed value, determines that therotation of the camera 50 only includes rotation around the opticalaxis. Specific determination processing performed by the determinationunit 160 will be described below.

The determination unit 160 prepares two virtual points between thecaptured image of the reference keyframe and the current captured imageand calculates the homography matrix H with respect to the virtualpoint. The determination unit 160 uses methods such as the DLT methodand the RANSAC method to calculate the homography matrix H. For example,the virtual point on the current captured image is set to a firstvirtual point and the virtual point on the captured image of thereference keyframe is set to a second virtual point.

The determination unit 160 uses a Gauss-Newton method to estimate therotation matrix R′ of the camera such that a virtual point which is theprojection of the first virtual point that has been projected on thecaptured image of the reference keyframe using the homography matrix Hcomes close to the second virtual point. The rotation matrix R′ is amatrix of 3 rows×3 columns.

The determination unit 160 calculates angles A_(x) and A_(y) around theaxis perpendicular to the optical axis based on expressions (14) and(15) respectively.

$\begin{matrix}{A_{x} = {\sin^{- 1}R_{32}^{\prime}}} & (14) \\{A_{y} = {\tan^{- 1}\frac{R_{31}^{\prime}}{R_{33}^{\prime}}}} & (15)\end{matrix}$

When the angles A_(x) and A_(y) both are less than a predeterminedthreshold, the determination unit 160 determines that no rotation aroundthe optical axis is included. When either one of the angles A_(x) andA_(y) is equal to or higher than the predetermined threshold, thedetermination unit 160 determines that a rotation around the opticalaxis is included.

The first relocalization processing unit 170 is a processing unit that,upon receiving a relocalization processing request from thedetermination unit 160, estimates the position and pose of the camera 50based on the image-to-image method. The first relocalization processingunit 170 estimates the current position and pose of the camera 50 fromthe correspondence relation between the captured image of the referencekeyframe and the current captured image.

For example, the first relocalization processing unit 170 usesexpressions (6), (16), and (17) to convert the position and pose of thecamera included in the reference keyframe into an pose matrix P_(k) of 4rows×4 columns by using Rodrigues' conversion.

$\begin{matrix}{t = \begin{pmatrix}t_{1} \\t_{2} \\t_{3}\end{pmatrix}} & (16) \\{P_{k} = \begin{pmatrix}R & t \\0 & 1\end{pmatrix}} & (17)\end{matrix}$

The first relocalization processing unit 170 uses the rotation matrix R′of the camera to calculate the position and pose matrix P_(n) of thecurrent camera by using expression (18). Furthermore, the firstrelocalization processing unit 170 may calculate an pose vector of thecurrent camera 50 by using Rodrigues' conversion presented in expression(19).

$\begin{matrix}{P_{n} = {\begin{pmatrix}R^{\prime} & 0 \\0 & 1\end{pmatrix}P_{k}}} & (18) \\{{\sin\;\theta*\begin{bmatrix}0 & {- r_{3}} & r_{2} \\r_{3} & 0 & {- r_{1}} \\{- r_{2}} & r_{1} & 0\end{bmatrix}} = \frac{R - R^{T}}{2}} & (19)\end{matrix}$

The second relocalization processing unit 180 is a processing unit that,upon receiving a relocalization processing request from thedetermination unit 160, estimates the position and pose of the camera 50based on the image-to-map method. The second relocalization processingunit 180 estimates the position and pose of the camera 50 based on thefeature points of the current captured image and the three-dimensionalmap.

For example, the second relocalization processing unit 180 performsmatching of the feature points of the current captured image and the mappoints. The second relocalization processing unit 180 may use the resultfrom the matching performed by the determination unit 160 or performprocessing that is the same as the processing performed by thedetermination unit 160.

FIG. 5 is a diagram illustrating an example of a matching result.Explanation of a number, X, Y, Z, and a feature descriptor illustratedin FIG. 5 is the same as that described with reference to FIG. 2. x, yrepresent two-dimensional coordinates of the feature points to be pairedwith the map points. The second relocalization processing unit 180 usesa pair of the map points and the feature points illustrated in FIG. 5 toestimate the position and pose of the camera by using the PnP algorithm.

Next, a procedure of processing performed by the camera pose estimationdevice 100 according to the first embodiment will be described. FIG. 6is a flow chart illustrating a procedure of processing performed by acamera pose estimation device according to the first embodiment. Asillustrated in FIG. 6, the image acquisition unit 110 of the camera poseestimation device 100 acquires a captured image from the camera 50 (stepS101).

The feature point extraction unit 120 of the camera pose estimationdevice 100 extracts feature points from the captured image (step S102).The camera pose estimation unit 130 of the camera pose estimation device100 performs matching of the map points and the feature points (stepS103) and estimate the position and pose of the camera (step S104).

The quality determination unit 140 of the camera pose estimation device100 determines the quality of the estimated value of the position andpose of the camera (step S105). When the estimated value is high quality(Yes at step S106), the quality determination unit 140 ends theprocessing. For example, when the estimated value is determined as highquality at step S106, the camera pose estimation device 100 determinesthe position and pose of the camera 50 estimated by the camera poseestimation unit 130 as the current position and pose of the camera.

By contrast, when the quality determination unit 140 has determined thatthe estimated value is not high quality (No at step S106), theprocessing proceeds to step S107. The preprocessing unit 150 of thecamera pose estimation device 100 searches for the reference keyframe(step S107).

The determination unit 160 of the camera pose estimation device 100determines whether or not a translational component is included (stepS108). When the determination unit 160 has determined that atranslational component is included (Yes at step S108), the processingproceeds to step S109. The second relocalization processing unit 180 ofthe camera pose estimation device 100 uses the image-to-map method toestimate the position and pose of the camera 50 (step S109).

By contrast, when the determination unit 160 has determined that notranslational component is included (No at step S108), the determinationunit 160 determines whether or not a rotation in the optical axisdirection is included (step S110). When the determination unit 160 hasdetermined that a rotation in the optical axis direction is included(Yes at step S110), the processing proceeds to step S109.

When the determination unit 160 has determined that no rotation in theoptical axis direction is included (No at step S110), the processingproceeds to step S111. The first relocalization processing unit 170 ofthe camera pose estimation device 100 uses the image-to-image method toestimate the position and pose of the camera 50 (step S111).

Next, an effect of the camera pose estimation device 100 according tothe first embodiment will be described. The camera pose estimationdevice 100 determines whether or not the camera motion includes atranslational movement, and if the camera motion includes atranslational movement, selects the image-to-map method to performrelocalization processing. The camera pose estimation device 100, if thecamera motion does not include a translational movement, determinesaround what direction the on-the-spot rotation is mainly performed, andif the on-the-spot rotation is performed around the optical axis, usesthe image-to-map method to perform relocalization processing. In othercases, the camera pose estimation device 100 uses the image-to-imagemethod to perform relocalization processing. With this, regardless ofthe positional relation between the position of the camera before themovement and that after the movement, the camera pose estimation device100 is able to accurately estimate the position and pose of the cameraand perform appropriate relocalization processing.

Second Embodiment

In a second embodiment, an embodiment related to relocalizationprocessing based on a marker having a predetermined shape will bedescribed. A camera pose estimation device according to the secondembodiment, upon detecting a marker from the captured image of thecamera, uses the detected marker to estimate the position and pose ofthe camera. The marker is hard to be incorrectly recognized comparedwith other objects and thus enables improvement in estimation accuracyof the position and pose of the camera 50, compared with theimage-to-image method and the image-to-map method.

FIG. 7 is a diagram illustrating a configuration of a camera poseestimation device according to a second embodiment. As illustrated inFIG. 7, this camera pose estimation device 200 is connected to thecamera 50. The camera pose estimation device 200 includes an imageacquisition unit 210, a marker detection unit 215, a feature pointextraction unit 220, a camera pose estimation unit 230, and a qualitydetermination unit 240. The camera pose estimation device 200 furtherincludes a preprocessing unit 250, a determination unit 260, a firstrelocalization processing unit 270, a second relocalization processingunit 280, and a third relocalization processing unit 290.

The image acquisition unit 210 is a processing unit that is connected tothe camera 50 to acquire a captured image from the camera 50. The imageacquisition unit 210 outputs the captured image to the feature pointextraction unit 220 and the marker detection unit 215.

The marker detection unit 215 is a processing unit that detects themarker from the captured image. When the marker detection unit 215detects the marker from the captured image, the marker detection unit215 outputs information indicating that the marker detection unit 215has detected the marker to the determination unit 260. Furthermore, themarker detection unit 215 outputs the captured image including themarker to the third relocalization processing unit 290.

FIG. 8 is a diagram illustrating an example of a target marker in thesecond embodiment. As illustrated in FIG. 8, a marker 60 has arectangular shape and a pattern for identifying the ID of the marker 60printed inside the rectangle. For example, the marker detection unit 215may use the technique described in H. Kato et al., “Marker Tracking andHMD Calibration for a Video-based Augmented Reality ConferencingSystem”, IWAR, pp. 85-94, 1999.

The marker detection unit 215 performs the processing described belowand thereby detects coordinates of four corners 60 a, 60 b, 60 c, and 60d of the marker 60 on the image. The marker detection unit 215 binarizesthe captured image to black and white. The marker detection unit 215performs labelling on the captured image thus binarized and extracts theoutline thereof. The marker detection unit 215 extracts a quadranglehaving four corners from the outline. The marker detection unit 215performs template matching between the extracted quadrangle and apredetermined pattern and detects a quadrangle coincided with thepredetermined pattern as the marker.

The explanation of the feature point extraction unit 220, the camerapose estimation unit 230, the quality determination unit 240, and thepreprocessing unit 250 is the same as that of the feature pointextraction unit 120, the camera pose estimation unit 130, the qualitydetermination unit 140, and the preprocessing unit 150 illustrated inFIG. 4. The explanation of the first relocalization processing unit 270and the second relocalization processing unit 280 is the same as that ofthe first relocalization processing unit 170 and the secondrelocalization processing unit 180 illustrated in FIG. 4.

The determination unit 260 is a processing unit that determines what isused for performing relocalization processing out of the image-to-imagemethod, the image-to-map method, and the marker. When the determinationunit 260 has received from the marker detection unit 215 informationindicating that the marker detection unit 215 has detected the marker,the determination unit 260 makes a relocalization processing request tothe third relocalization processing unit 290. Other processing relatedto the determination unit 260 is the same as that related to thedetermination unit 160 illustrated in FIG. 4.

The third relocalization processing unit 290 is a processing unit that,upon receiving a relocalization processing request from thedetermination unit 260, estimates the position and pose of the camera 50using the marker. For example, the third relocalization processing unit290 may use any conventional technique that estimates the position andpose of the camera 50 based on the marker. In the description below, anexample of processing performed by the third relocalization processingunit 290 will be described. For example, the third relocalizationprocessing unit 290 sequentially performs estimation of a rotationmatrix R, estimation of a translational movement component, andvectorization of a rotation movement component, and thereby estimatesthe position and pose of the camera 50.

Processing for estimating a rotation matrix R of 3 rows×3 columns willbe described. The third relocalization processing unit 290 performs thesame processing as that performed by the marker detection unit 215 anddetects four corners of the maker included in the captured image. Thethird relocalization processing unit 290 calculates direction vectorsV₁, V₂ including the marker from the four corners of the marker. Thethird relocalization processing unit 290 calculates a unit vector V₃orthogonal to V₁, V₂. The rotation matrix R may be represented byexpression (20).R=[V ₁ ,V ₂ ,V ₃]  (20)

Processing for estimating a translational movement component of 3 rows×1column will be described. The third relocalization processing unit 290substitutes the rotation matrix R in expression (21) and (22) andthereby obtains a simultaneous equation related to W₁, W₂, W₃. The thirdrelocalization processing unit 290 solves the simultaneous equation by aleast-squares method and thereby obtains translational movementcomponents of 3 rows×1 column [W₁, W₂, W₃]. For example, the thirdrelocalization processing unit 290 uses the technique described in theabove-mentioned non-patent literature by H. Kato to obtain thetranslational movement components.

$\begin{matrix}\begin{matrix}{\begin{bmatrix}X_{c} \\Y_{c} \\Z_{c} \\1\end{bmatrix} = {\begin{bmatrix}V_{11} & V_{12} & V_{13} & W_{x} \\V_{21} & V_{22} & V_{23} & W_{y} \\V_{31} & V_{32} & V_{33} & W_{z} \\0 & 0 & 0 & 1\end{bmatrix}\begin{bmatrix}X_{m} \\Y_{m} \\Z_{m} \\1\end{bmatrix}}} \\{= {\begin{bmatrix}\; & V_{3 \times 3} & \; & V_{3 \times 1} \\0 & 0 & 0 & 1\end{bmatrix}\begin{bmatrix}X_{m} \\Y_{m} \\Z_{m} \\1\end{bmatrix}}} \\{= {T_{cm}\begin{bmatrix}X_{m} \\Y_{m} \\Z_{m} \\1\end{bmatrix}}}\end{matrix} & (21) \\{{P = \begin{bmatrix}P_{11} & P_{12} & P_{13} & 0 \\0 & P_{22} & P_{23} & 0 \\0 & 0 & 1 & 0 \\0 & 0 & 0 & 1\end{bmatrix}},{\begin{bmatrix}{hx}_{C} \\{hy}_{C} \\h \\1\end{bmatrix} = {P\begin{bmatrix}X_{c} \\Y_{c} \\Z_{c} \\1\end{bmatrix}}}} & (22)\end{matrix}$

Vectorization of a rotation movement component will be described. Thethird relocalization processing unit 290 converts the rotation matrix of3 rows×3 columns into a three-dimensional vector r based on expression(6). The third relocalization processing unit 290 estimates theabove-described translational movement components [W₁, W₂, W₃] and thevector r as the position and pose of the camera 50.

Next, a procedure of processing performed by the camera pose estimationdevice 200 according to the second embodiment will be described. FIG. 9is a flow chart illustrating a procedure of processing performed by acamera pose estimation device according to the second embodiment. Asillustrated in FIG. 9, the image acquisition unit 210 of the camera poseestimation device 200 acquires a captured image from the camera 50 (stepS201).

The feature point extraction unit 220 of the camera pose estimationdevice 200 extracts a feature point from the captured image (step S202).The camera pose estimation unit 230 of the camera pose estimation device200 performs matching of map points and feature points (step S203) andestimates the position and pose of the camera (step S204).

The quality determination unit 240 of the camera pose estimation device200 determines quality of the estimated value of the position and poseof the camera (step S205). When the estimated value is high quality (Yesat step S206), the quality determination unit 240 ends the processing.For example, when the quality determination unit 240 has determined thatthe estimated value is high quality at step S206, the camera poseestimation device 200 determines the position and pose of the camera 50estimated by the camera pose estimation unit 230 as the current positionand pose of the camera.

By contrast, when the quality determination unit 240 has determined thatthe estimated value is not high quality (No at step S206), theprocessing proceeds to step S207. The marker detection unit 215 of thecamera pose estimation device 200, when a marker is present (Yes at stepS207), moves to step S208, and when no marker is present (No at stepS207), moves to step S209. The preprocessing unit 250 of the camera poseestimation device 200 searches for a reference keyframe (step S209).

At step S208, the camera pose estimation device 200 estimates theposition and pose of the camera based on the detection result of themarker (step S208).

The determination unit 260 of the camera pose estimation device 200determines whether or not a translational component is included (stepS210). When the determination unit 260 has determined that atranslational component is included (Yes at step S210), the processingproceeds to step S212. The second relocalization processing unit 280 ofthe camera pose estimation device 200 uses the image-to-map method toestimate the position and pose of the camera 50 (step S212).

By contrast, when the determination unit 260 has determined that notranslational component is included (No at step S210), the determinationunit 260 determines whether or not a rotation in the optical axisdirection is included (step S211). When the determination unit 260 hasdetermined that a rotation in the optical axis direction is included(Yes at step S211), the processing proceeds to step S212.

When the determination unit 260 has determined that no rotation in theoptical axis direction is included (No at step S211), the processingproceeds to step S213. The first relocalization processing unit 270 ofthe camera pose estimation device 200 uses the image-to-image method toestimate the position and pose of the camera 50 (step S213).

Next, an effect of the camera pose estimation device 200 according tothe second embodiment will be described. The camera pose estimationdevice 200, upon detecting a marker from the captured image of thecamera, uses the detected marker to estimate the position and pose ofthe camera. The marker is hard to be incorrectly recognized comparedwith other objects and thus enables improvement in estimation accuracyof the position and pose of the camera 50, compared with theimage-to-image method and the image-to-map method.

Next, other embodiment will be described. In the first and the secondembodiments, the quality determination units 140 and 240 determine thequality of the pose estimation, whereby whether or not relocalizationprocessing is performed is determined. However, there also is a casewhere, even when the estimated value is equal to or lower than athreshold, the camera pose estimation itself is successful. Ifrelocalization processing is performed and an erroneous relocalizationresult is applied in the above-describe case, the position and pose ofthe camera may be lost in that state. For example, if a feature pointhas erroneous correspondence, an error is generated in the estimationresult of the relocalization processing. For this reason, the camerapose estimation devices 100 and 200 may further determine validity ofthe position and pose identified by the relocalization processing.

Other embodiment will now be described by using the camera poseestimation device 100 illustrated in FIG. 4. The quality determinationunit 140 holds therein in advance the position and pose of the camera 50as the result of relocalization at the previous time and the positionand pose of the camera 50 in a case where relocalization processing hasnot been performed. The quality determination unit 140 then uses theposition and pose in both cases described above to perform the matchingand the camera position and pose estimation, and thereby determines thequality. The quality determination unit 140 performs the subsequentprocessing by using the result of the matching and the position and poseestimation of the camera 50 from the case having created the higherestimated value of the position and pose.

FIG. 10 is a flow chart illustrating a procedure of processing performedby a camera pose estimation device according to other embodiment. It isnoted that before the processing illustrated in FIG. 10 is performed,the processing explained with reference to FIG. 6 has been performed atleast once. As illustrated in FIG. 10, the image acquisition unit 110 ofthe camera pose estimation device 100 acquires a captured image from thecamera 50 (step S301).

The feature point extraction unit 120 of the camera pose estimationdevice 100 extracts a feature point from the captured image (step S302).The camera pose estimation unit 130 of the camera pose estimation device100 uses the position and pose of the camera at the last time for whichrelocalization processing has not been performed to perform matching andestimate the position and pose of the camera, and thereby determinesquality of the estimated value (step S303).

The camera pose estimation unit 130 of the camera pose estimation device100 uses the position and pose of the camera at the last time for whichrelocalization processing has been performed to perform matching andestimate the position and pose of the camera, and thereby determinesquality of the estimated value (step S304). The quality determinationunit 140 of the camera pose estimation device 100 causes the result withhigher quality to be stored (step S305).

When the estimated value is high quality (Yes at step S306), the qualitydetermination unit 140 ends the processing. For example, when the camerapose estimation device 100 has determined that the estimated value ishigh quality at step S306, the camera pose estimation device 100determines the position and pose of the camera 50 stored at step S305 asthe current position and pose of the camera.

By contrast, when the quality determination unit 140 has determined thatthe estimated value is not high quality (No at step S306), theprocessing proceeds to step S307. The preprocessing unit 150 of thecamera pose estimation device 100 searches for a reference keyframe(step S307).

The determination unit 160 of the camera pose estimation device 100determines whether or not a translational component is included (stepS308). When the determination unit 160 has determined that atranslational component is included (Yes at step S308), the processingproceeds to step S309. The second relocalization processing unit 180 ofthe camera pose estimation device 100 uses the image-to-map method toestimate the position and pose of the camera 50 (step S309).

By contrast, when the determination unit 160 has determined that notranslational component is included (No at step S308), the determinationunit 160 determines whether or not a rotation in the optical axisdirection is included (step S310). When the determination unit 160 hasdetermined that a rotation in the optical axis direction is included(Yes at step S310), the processing proceeds to step S309.

When the determination unit 160 has determined that no rotation in theoptical axis direction is included (No at step S310), the processingproceeds to step S311. The first relocalization processing unit 170 ofthe camera pose estimation device 100 uses the image-to-image method toestimate the position and pose of the camera 50 (step S311).

As illustrated in FIG. 10, the camera pose estimation device 100evaluates the position and pose of the camera 50 for whichrelocalization processing has been performed and the position and poseof the camera 50 for which relocalization processing has not beenperformed, and uses the one with the better evaluation result tocontinue the processing. This enables improvement in estimation accuracyof the position and pose of the camera even when an error is generatedin the estimation result with relocalization processing.

Next, other embodiment using the image-to-map method described in thefirst and the second embodiments will be described. For example, the PnPalgorithm used by the second relocalization processing unit 180, ingeneral, roughly calculates an initial estimated value of the camerapose based on the DLT method and then determines a final pose valueusing an iterative method such as a Levenberg-Marquardt method.

However, when the first embodiment is applied, depending on thegeneration state of erroneous correspondence in feature point matching,the initial position estimation based on the DLT method causes a resultdeviated from an ideal value. FIG. 11 is a diagram illustrating aproblem in initial position estimation based on a DLT method. The leftfigure in FIG. 11 illustrates a state in which a problem occurs andillustrates a three-dimensional map, a keyframe, and a camera positionestimation result. The position estimation result is obtained in therear of the map whereas the camera position estimation result originallyhas to be obtained in a position near the keyframe.

For this reason, the second relocalization processing unit 180 sets theinitial camera pose value by the PnP algorithm to the camera pose valueof the reference keyframe. The result added with the above-describedimprovement is illustrated in the right figure in FIG. 11. With thesecond relocalization processing unit 180 using this initial value, theestimation result is obtained in a position near the keyframe, wherebythe estimation accuracy of the position and pose is improved.

Next, an example of a computer will be described that executes a camerapose estimation program implementing the same function as those of thecamera pose estimation devices 100 and 200 described in the embodimentsdescribed above. FIG. 12 is a diagram illustrating an example of acomputer executing a camera pose estimation program.

As illustrated in FIG. 12, a computer 300 includes a CPU 301 thatperforms various calculation processing, an input device 302 thatreceives a data input from the user, and a display 303. Furthermore, thecomputer 300 includes a reading device 304 that reads a program, forexample, from a recording medium, an interface device 305 that transmitsand receives data to and from other computer via a network, and a camera306. Furthermore, the computer 300 includes a RAM 307 that temporarilystores therein various information and a hard disk device 308. Each ofthe devices 301 to 308 is connected to a bus 309.

The hard disk device 308 includes a determination program 308 a. The CPU301 reads the determination program 308 a and develops the readdetermination program 308 a in the RAM 307. The determination program308 a functions as a determination process 307 a. The processing of thedetermination process 307 a corresponds to the processing performed bythe determination units 160 and 260.

It is noted that the determination program 208 a does not necessarilyhas to be stored in the hard disk device 308 from the start. Forexample, each program is stored in advance in a “portable physicalmedium” to be inserted into the computer 300, such as a flexible disk(FD), a CD-ROM, a DVD disk, a magneto-optical disk, and an IC card. Thecomputer 300 may then read the determination program 308 a and executesthe read determination program 308 a.

All examples and conditional language recited herein are intended forpedagogical purposes to aid the reader in understanding the inventionand the concepts contributed by the inventor to furthering the art, andare to be construed as being without limitation to such specificallyrecited examples and conditions, nor does the organization of suchexamples in the specification relate to a showing of the superiority andinferiority of the invention. Although the embodiments of the presentinvention have been described in detail, it should be understood thatthe various changes, substitutions, and alterations could be made heretowithout departing from the spirit and scope of the invention.

What is claimed is:
 1. A method comprising: determining movement of acamera from a first time point when a first image has been captured to asecond time point when a second image has been captured based on thefirst image and the second image captured by the camera; performingfirst estimation processing for estimating a position and pose of thecamera in the second time point based on image data at a time ofcapturing the image data, a past image captured in the past, and a pastposition and pose of the camera at a time point when the past image hasbeen captured, when the movement is not a translational movement and arotation movement around an optical direction; and performing a secondestimation processing for estimating the position and pose of the cameraat the second time point based on a feature descriptor of a featurepoint extracted from the second image and a feature descriptor of a mappoint accumulated in the past, when the movement is the translationalmovement or the rotational movement around the optical direction.
 2. Themethod according to claim 1, further comprising: performing a thirdestimation processing for estimating the position and pose of the camerausing another method prior to the first estimation processing or thesecond estimation processing; and performing the first estimationprocessing or the second estimation processing when quality determinedby the third estimation processing is lower than a threshold.
 3. Themethod according to claim 2, further comprising: performing a fourthestimation processing for estimating the position and pose of the camerabased on a marker when the quality determined by the third estimationprocessing is lower than a threshold and the marker, which has apredetermined shape, has been detected from the second image.
 4. Themethod according to claim 1, wherein the first estimation processing isprocessing that uses an image-to-image method.
 5. The method accordingto claim 1, wherein the second estimation processing is processing thatuses an image-to-map method.
 6. The method according to claim 1, furthercomprising: displaying additional information on the second image to bedisplayed on a display based on a result from the first estimationprocessing or the second estimation processing.
 7. The method accordingto claim 6, wherein the additional information is an augmented realitycontent.
 8. A device comprising: a memory; and a processor coupled tothe memory and configured to: determine movement of a camera from afirst time point when a first image has been captured to a second timepoint when a second image has been captured based on the first image andthe second image captured by the camera, perform first estimationprocessing for estimating a position and pose of the camera in thesecond time point based on image data at a time of capturing the imagedata, a past image captured in the past, and a past position and pose ofthe camera at a time point when the past image has been captured, whenthe movement is not a translational movement and a rotation movementaround an optical direction, and perform a second estimation processingfor estimating the position and pose of the camera at the second timepoint based on a feature descriptor of a feature point extracted fromthe second image and a feature descriptor of a map point accumulated inthe past, when the movement is the translational movement or therotational movement around the optical direction.
 9. The deviceaccording to claim 8, wherein the processor is configured to: perform athird estimation processing for estimating the position and pose of thecamera using another method prior to the first estimation processing orthe second estimation processing, and perform the first estimationprocessing or the second estimation processing when quality determinedby the third estimation processing is lower than a threshold.
 10. Thedevice according to claim 9, wherein the processor is configured toperform a fourth estimation processing for estimating the position andpose of the camera based on a marker when the quality determined by thethird estimation processing is lower than a threshold and the marker,which has a predetermined shape, has been detected from the secondimage.
 11. The device according to claim 8, wherein the first estimationprocessing is processing that uses an image-to-image method.
 12. Thedevice according to claim 8, wherein the second estimation processing isprocessing that uses an image-to-map method.
 13. The device according toclaim 8, wherein the processor is configured to display additionalinformation on the second image to be displayed on a display based on aresult from the first estimation processing or the second estimationprocessing.
 14. The device according to claim 13, wherein the additionalinformation is an augmented reality content.
 15. A non-transitorycomputer-readable storage medium storing a program for causing acomputer to execute a process, the process comprising: determiningmovement of a camera from a first time point when a first image has beencaptured to a second time point when a second image has been capturedbased on the first image and the second image captured by the camera;performing first estimation processing for estimating a position andpose of the camera in the second time point based on image data at atime of capturing the image data, a past image captured in the past, anda past position and pose of the camera at a time point when the pastimage has been captured, when the movement is not a translationalmovement and a rotation movement around an optical direction; andperforming a second estimation processing for estimating the positionand pose of the camera at the second time point based on a featuredescriptor of a feature point extracted from the second image and afeature descriptor of a map point accumulated in the past, when themovement is the translational movement or the rotational movement aroundthe optical direction.
 16. The non-transitory computer-readable storagemedium according to claim 15, the process further comprising: performinga third estimation processing for estimating the position and pose ofthe camera using another method prior to the first estimation processingor the second estimation processing; and performing the first estimationprocessing or the second estimation processing when quality determinedby the third estimation processing is lower than a threshold.
 17. Thenon-transitory computer-readable storage medium according to claim 16,the process further comprising: performing a fourth estimationprocessing for estimating the position and pose of the camera based on amarker when the quality determined by the third estimation processing islower than a threshold and the marker, which has a predetermined shape,has been detected from the second image.
 18. The non-transitorycomputer-readable storage medium according to claim 15, wherein thefirst estimation processing is processing that uses an image-to-imagemethod.
 19. The non-transitory computer-readable storage mediumaccording to claim 15, wherein the second estimation processing isprocessing that uses an image-to-map method.
 20. The non-transitorycomputer-readable storage medium according to claim 15, the processfurther comprising: displaying additional information on the secondimage to be displayed on a display based on a result from the firstestimation processing or the second estimation processing.